package com.onlymarshall.wheresmao.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts2.ServletActionContext;

import com.google.appengine.api.users.User;
import com.google.appengine.api.users.UserServiceFactory;
import com.opensymphony.xwork2.Action;
import com.opensymphony.xwork2.Preparable;

public abstract class BaseAction implements Action, Preparable {
	
	public final static String SUCESS = "sucesss";
	public final static String INPUT = "input";

	public User getCurrentUser(){
		return UserServiceFactory.getUserService().getCurrentUser();
	}
	
	public HttpServletRequest getRequest(){
		return ServletActionContext.getRequest();
	}
	
	public HttpServletResponse getResponse(){
		return ServletActionContext.getResponse();
	}
	
	public void prepare(){}

}
